package com.huluobo.document

import com.huluobo.document.entity.DocumentEntity
import com.huluobo.lib_base.Res
import com.huluobo.lib_http.Const
import kotlinx.coroutines.flow.Flow
import okhttp3.MultipartBody
import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.Query

/**
 *  Created by LC on 2025/6/13.
 */
interface ApiService {
    @GET(Const.URL_GET_DOCUMENT)
    fun getDocument(): Flow<Res<DocumentEntity>>

    @Multipart
    @POST(Const.URL_UPLOAD_FILE)
    fun uploadFile(@Part data: List<MultipartBody.Part>): Flow<Res<Any>>

    @GET(Const.URL_DELETE_FILE)
    fun deleteDocument(@Query(Const.PARAM_ID) id: Int): Flow<Res<Any>>
}